package visitor.pattern.simple.browser.google;

import visitor.pattern.simple.browser.internet.AbstractHtmls;
import visitor.pattern.simple.browser.internet.Baidu;
import visitor.pattern.simple.browser.internet.Bilibili;
import visitor.pattern.simple.browser.internet.QQZone;
import visitor.pattern.simple.browser.visitors.Visitor;

import java.util.ArrayList;

/**
 * @Author: Coderlyz
 * @Date: 2023/4/3 19:46
 */
public class GoogleBrowser implements Browser{

    private ArrayList htmlList = new ArrayList<AbstractHtmls>();

    public GoogleBrowser(){
        //浏览器的属性  可以理解为浏览器里的内容  也就是被访问的内容
        htmlList.add(new Baidu());
        htmlList.add(new Bilibili());
        htmlList.add(new QQZone());
    }

    @Override
    public void openedBy(Visitor visitor) {
        visitor.visit(htmlList);
    }

}
